package com.kayak.distribute.client.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.kayak.distribute.bean.UserAddress;
import com.kayak.distribute.service.IOrderService;
import com.kayak.distribute.service.IUserService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * @ClassName OrderServiceImpl
 * @Dsecription
 */
@Service
public class OrderServiceImpl implements IOrderService {

	@Reference(version = "1.0.0")
	IUserService userService;

	@Override
	public List<UserAddress> initOrder(String userId) {
		System.out.println("用户id：" + userId);
		//1、查询用户的收货地址
		List<UserAddress> addressList = userService.getUserAddressList(userId);
		return addressList;
	}

	public List<UserAddress> hello(String userId) {
		return Arrays.asList(new UserAddress(10, "测试地址", "1", "测试", "测试", "Y"));
	}
}
